package app;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import java.util.List;

public class PageElenmentApp extends BaseActionApp {

    /**
     * @param uiConfigPath 配置文件路径
     * @param valueName    uiConfig要测试功能模块
     */
    public PageElenmentApp(String uiConfigPath, String valueName) {
        //工程内读取对象库文件
        setXmlObjectPath(uiConfigPath);
        getLocatorMap(valueName);
    }

    public LocatorApp elenment(String BtNamee) {
        LocatorApp locator = getLocator(BtNamee);
        return locator;
    }

    public List<WebElement> elenments(String BtNamee) {
        return driver.findElements(By.xpath(BtNamee));
    }
}